<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateLuckMoneyLogsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('luck_money_logs', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('game_id')->comment('PK赛ID');
            $table->integer('user_id')->comment('用户ID');
            $table->integer('rule_id')->comment('规则ID');
            $table->integer('time')->comment('当前抽奖次数');
            $table->integer('money')->comment('金额');
            $table->integer('total')->comment('当前累计');
            $table->integer('status')->comment('状态（0.作废，1.新增，2.确认）')->default(1);

            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('luck_money_logs');
    }
}
